package com.nc.delivery_project.client.request;

import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;
import com.nc.delivery_project.server.service.OrderService;
import com.nc.delivery_project.shared.proxy.OrderProxy;
import com.nc.delivery_project.shared.servicelocator.OrderServiceLocator;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Natalie D.
 * Date: 1/17/15
 * Time: 9:12 PM
 */
@Service(value = OrderService.class, locator = OrderServiceLocator.class)
public interface OrderRequest extends RequestContext {

    Request<Integer> create(OrderProxy order);

    Request<List<OrderProxy>> read();

    Request<OrderProxy> read(int orderId);

    Request<List<OrderProxy>> readBySenderId(String senderId);

    Request<List<OrderProxy>> readByReceiverId(String receiverId);

    Request<Void> update(OrderProxy order);

    Request<Void> delete(int orderId);


}